/**
 * @param {number[]} nums
 * @return {void} Do not return anything, modify nums in-place instead.
 */
var moveZeroes = function(nums) {
    for(let slow=0,fast=0;fast<nums.length;fast++){
        if(nums[fast]!==0){
            [nums[slow],nums[fast]]=[nums[fast],nums[slow]]
            slow++
        }
    }
    return nums
};
console.log(moveZeroes([0,1,0,3,12]));
